public class Test {
    public void func(Animal animal){
        animal.eat();
    }
    public void RunTest(IRunnable i){
        i.run();
    }
    public static void main(String[] args) {
        Dog dog = new Dog(2,"旺财");
        Brid brid = new Brid(3,"图图");
        /*dog.eat();*/
       /* dog.run();*/
        //Animal k = new Dog();向上转型
        Test test = new Test();
        test.func(brid);
        test.RunTest(dog);

    }
    public static void main1(String[] args) {
        Test test = new Test();
        Dog dog = new Dog(2,"旺财");
       // System.out.println(dog.i);
        dog.show();


    }
}
